package hit.util.autoProductID;

import java.util.Observable;

/**
 * Creates a thread to get a Product Description from the
 * 	(@link ProductIdentifer}. 
 */
public class PIThread extends Observable implements Runnable {

	private String barcode;
	
	public PIThread(String barcode)
	{
		this.barcode = barcode;
	}
	
	@Override
	public void run() {
		
		ProductIdentifier pi = ProductIdentifier.Instance();
		
		String result = pi.GetDescription(barcode);
		
		this.setChanged();
		super.notifyObservers(result);
	}

}
